POV-Ray : Newsgroups : povray.general : Height fields in isos (3.5) : Re: Height fields in isos (3.5) Server Time
19 Nov 2024 15:36:54 EST (-0500)
  Re: Height fields in isos (3.5)  
From: Christoph Hormann
Date: 12 Feb 2002 07:37:48
Message: <3C690C98.73644E17@gmx.de>
Tom Melly wrote:
> 
> have I imagined it, or can you use an hf as a pigment and then use that in an
> iso-function?

You obviously cannot use a heightfield in an isosurface, but of course you
can use an image_map/image_pattern is an isosurface function just like any
other pigment/pattern.  Make sure you use 'interpolate 2', otherwise you
will get problems with the gradient.

> 
> If so, can someone post a quick example?
> 

The following should give an idea (not tested)

#declare fn_Img=function {
  pigment {
    image_map {
      png "file.png"    
      map_type 0   
      interpolate 2    
      once  
    }                                                   
  }   
} 

#declare fn_iso=function {         
  z - fn_Img(x, y, 0).gray*0.1  
} 

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 06 Feb. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.